<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="check-id"></th>
            <th>盘点单号</th>
            <th>审批状态</th>
            <th>盘点状态</th>
            <th>盘点日期</th>
            <th>完成日期</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td><input type="checkbox" class="check-id" name="check_id[]" value="{$item.check_id}"></td>
                <td class="copy-text">{$item.check_sn}</td>
                <td>{$item.check_status}</td>
                <td>
                    <span class="{$item.status?'text-yellow':'text-muted'}"><i class="fa fa-circle"></i>{$item.status?'已盘点':'待盘点'}</span>
                </td>
                <td>{$item.check_date}</td>
                <td>{$item.finish_date}</td>
                <td class="text-left">{$item.remark}</td>
                <td class="text-left">
                    {if $is_show_info}
                    <a class="layui-btn layui-btn-xs layui-btn-normal ajax-form" height-form="80%" width-form="80%" href="{:url('info', ['check_id' => $item['check_id']])}" item="{$item.check_id}">查看</a>
                    {/if}
                    {if $is_show_check && \app\common\model\JobFlowModule::isCheckIng($item)}
                    <a class="layui-btn layui-btn-xs check-job-flow" item="{$item.check_id}">审批</a>
                    {/if}
                    {if \app\common\model\JobFlowModule::isCheckFinish($item)}
                        {if $is_show_take && \app\common\model\JobFlowModule::isCheckFinish($item) && $item.status != 1}
                        <a href="{:url('take', ['check_id' => $item['check_id']])}" class="layui-btn layui-btn-xs">盘点</a>
                        {/if}
                        {if $is_show_save && $item.status != 1}
                        <a class="layui-btn layui-btn-xs  layui-btn-warm ajax-get" href="{:url('save', ['check_id' => $item['check_id'], 'status' => 1])}">完成</a>
                        {/if}
                    {/if}
                    {if \app\common\model\JobFlowModule::isCheckWait($item)}
                        <a class="layui-btn layui-btn-xs  layui-btn-warm ajax-form" href="{:url('add', ['check_id' => $item['check_id']])}" title="更新盘点单">更新</a>
                    {/if}
                </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="9">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>